package twitter.RequestParser;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;

import Twitter.RequestSender.RequestSender;

import twitter.Database.TwitterMaintainer;
import twitter.TwitterLibrary.SocketConfig;
import twitter.TwitterLibrary.Utility;

public class PrimaryRequestParser extends BackendRequestParser{
	private RequestSender sender;
	public PrimaryRequestParser(TwitterMaintainer twitterMaintainer,Utility utility) {
		super(twitterMaintainer,utility);
		sender=new RequestSender(utility);
		// TODO Auto-generated constructor stub
	}
	
	public void parsePost(NamedNodeMap Atts,String query)
	{
		
		super.parsePost(Atts, query);
		sender.sendRequestToEveryBackendServer(query+"\r\n backend \r\n");
		
	}
}
